package com.my.zl.console.controller.visualEdit;


import java.util.HashMap;
import java.util.Map;

import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import com.my.zl.console.controller.base.BaseController;

import io.swagger.annotations.Api;

/**
 *  可视化编辑
 * @author ZL
 */
@Api(value="下拉选项")
@Controller
@RequestMapping("/api/autocode/edit")
public class EditController extends BaseController {
    
    /**
     * 
     */
    @RequestMapping(value="/run", method = {RequestMethod.POST,RequestMethod.GET})
    public String selectDict(ModelMap map,String htmlDtlId, String htmlContent,String jsContent) throws Exception{
        Map<String, Object> rootMap = new HashMap<>();
        rootMap.put("htmlContent", htmlContent);
        rootMap.put("jsContent", jsContent);
        rootMap.put("htmlDtlId", htmlDtlId);
        rootMap.put("http", "http://127.0.0.1:9091/autocode/zl-bootstrap");
//        rootMap.put("http", "http://130.252.200.194:9091/autocode/zl-bootstrap");
        map.putAll(rootMap);
        return "autocode/edit-index";
    }
}